from xml.dom import minidom
class xmlparse():
    def __init__(self,FileName):
        self.doc=minidom.parse(FileName)
    def getAttrFloat(self,element_name,attribute_name):
        a=self.doc.getElementsByTagName(element_name)
        x=float(a[0].getAttribute(attribute_name))
        del a
        return x
    def getAttrStr(self,element_name,attribute_name):
        a=self.doc.getElementsByTagName(element_name)
        x=str(a[0].getAttribute(attribute_name))
        del a
        return x
##--------useage-----------------
##from parse import xmlparse
##b=xmlparse("param.xml")
##b.getAttrFloat("maxAccel","a")
##b.getAttrStr("Filename","FName")
    ## newline

